package cn.changeforyou.web.controller;

import cn.changeforyou.web.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhyu
 * @version 1.0
 * @date 2022/2/8 16:22
 */
@RestController
@RequestMapping("draft")
public class DraftController {

    @Autowired
    private UserDao userDao;

    private void t(Runnable runnable) {
        try {
            runnable.run();
        } catch (Exception e) {
        }
    }

    @GetMapping("/")
    public void root() {
//        t(() -> userDao.insertList1(new ArrayList<>()));
//        t(() -> userDao.insertList2(new User()));
//        t(() -> userDao.insertList3(new ArrayList<>()));
//        t(() -> userDao.insertList4(new Object(), new Object()));
//        t(() -> userDao.insertList5(1, 2, 3));
//        t(() -> userDao.i1(1));
//        t(() -> userDao.i2(1));
//        t(() -> userDao.i3(new ArrayList(), 1));
//        t(() -> userDao.i4(new ArrayList(), 1));
//        t(() -> userDao.i5(new ArrayList<>(), 2));
//        t(() -> userDao.i6(new ArrayList<>()));
//        t(() -> userDao.i7(new LinkedList<>()));
//        t(() -> userDao.i8(new HashMap<>()));
//        t(() -> userDao.i9(new HashSet()));
//    }
    }
}
